import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/LoginView.vue'
import Register from '../views/RegisterView.vue'

Vue.use(VueRouter)

const routes = [
  { path: '/login', component: Login },
  { path: '/register', component: Register },
  { path: '/', redirect: '/login' }
]

const router = new VueRouter({
    mode: 'hash',
    routes
  })
  
  export default router // 关键：默认导出